package com.mashibing.juc.c_001;

/**
 * @ClassName T03_Synchronized
 * @Description synchronized关键字，对某个线程加锁
 * @Author xiongwei.wu
 * @Date 2021/6/30 16:38
 **/
public class T03_Synchronized {
    private int count = 10;

    //在方法上面加锁
    public synchronized void m() {
        count--;
        System.out.println(Thread.currentThread().getName() + " count = " + count);
    }
}
